import request from '@/utils/request'

// 查询巡检列表
export function listPcheck(query) {
  return request({
    url: '/qa/pcheck/list',
    method: 'get',
    params: query
  })
}

// 查询巡检详细
export function getPcheck(pcheckId) {
  return request({
    url: '/qa/pcheck/' + pcheckId,
    method: 'get'
  })
}

// 新增巡检
export function addPcheck(data) {
  return request({
    url: '/qa/pcheck',
    method: 'post',
    data: data
  })
}

// 修改巡检
export function updatePcheck(data) {
  return request({
    url: '/qa/pcheck',
    method: 'put',
    data: data
  })
}

// 删除巡检
export function delPcheck(pcheckId) {
  return request({
    url: '/qa/pcheck/' + pcheckId,
    method: 'delete'
  })
}

// 导出巡检
export function exportPcheck(query) {
  return request({
    url: '/qa/pcheck/export',
    method: 'get',
    params: query
  })
}